home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue52 / HTML / Code / AppServer / SML_Handler_TLB.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1999-10-26  |  4.1 KB  |  95 lines

  1. unit SML_Handler_TLB;
  2.  
  3. // ************************************************************************ //
  4. // WARNING                                                                  //
  5. // -------                                                                  //
  6. // The types declared in this file were generated from data read from a     //
  7. // Type Library. If this type library is explicitly or indirectly (via      //
  8. // another type library referring to this type library) re-imported, or the //
  9. // 'Refresh' command of the Type Library Editor activated while editing the //
  10. // Type Library, the contents of this file will be regenerated and all      //
  11. // manual modifications will be lost.                                       //
  12. // ************************************************************************ //
  13.  
  14. // PASTLWTR : $Revision:   1.11.1.75  $
  15. // File generated on 10/10/99 7:20:01 PM from Type Library described below.
  16.  
  17. // ************************************************************************ //
  18. // Type Lib: D:\SST\9912\Code\AppServer\SML_Handler.tlb
  19. // IID\LCID: {F41822DB-7F47-11D3-B020-000000000000}\0
  20. // Helpfile: 
  21. // HelpString: Project1 Library
  22. // Version:    1.0
  23. // ************************************************************************ //
  24.  
  25. interface
  26.  
  27. uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL;
  28.  
  29. // *********************************************************************//
  30. // GUIDS declared in the TypeLibrary. Following prefixes are used:      //
  31. //   Type Libraries     : LIBID_xxxx                                    //
  32. //   CoClasses          : CLASS_xxxx                                    //
  33. //   DISPInterfaces     : DIID_xxxx                                     //
  34. //   Non-DISP interfaces: IID_xxxx                                      //
  35. // *********************************************************************//
  36. const
  37.   LIBID_SML_Handler: TGUID = '{F41822DB-7F47-11D3-B020-000000000000}';
  38.   IID_ISMLHandler: TGUID = '{F41822DC-7F47-11D3-B020-000000000000}';
  39.   CLASS_SMLHandler: TGUID = '{F41822DE-7F47-11D3-B020-000000000000}';
  40. type
  41.  
  42. // *********************************************************************//
  43. // Forward declaration of interfaces defined in Type Library            //
  44. // *********************************************************************//
  45.   ISMLHandler = interface;
  46.   ISMLHandlerDisp = dispinterface;
  47.  
  48. // *********************************************************************//
  49. // Declaration of CoClasses defined in Type Library                     //
  50. // (NOTE: Here we map each CoClass to its Default Interface)            //
  51. // *********************************************************************//
  52.   SMLHandler = ISMLHandler;
  53.  
  54.  
  55. // *********************************************************************//
  56. // Interface: ISMLHandler
  57. // Flags:     (4416) Dual OleAutomation Dispatchable
  58. // GUID:      {F41822DC-7F47-11D3-B020-000000000000}
  59. // *********************************************************************//
  60.   ISMLHandler = interface(IDispatch)
  61.     ['{F41822DC-7F47-11D3-B020-000000000000}']
  62.     function GetContent(const aVariables: WideString): WideString; safecall;
  63.   end;
  64.  
  65. // *********************************************************************//
  66. // DispIntf:  ISMLHandlerDisp
  67. // Flags:     (4416) Dual OleAutomation Dispatchable
  68. // GUID:      {F41822DC-7F47-11D3-B020-000000000000}
  69. // *********************************************************************//
  70.   ISMLHandlerDisp = dispinterface
  71.     ['{F41822DC-7F47-11D3-B020-000000000000}']
  72.     function GetContent(const aVariables: WideString): WideString; dispid 1;
  73.   end;
  74.  
  75.   CoSMLHandler = class
  76.     class function Create: ISMLHandler;
  77.     class function CreateRemote(const MachineName: string): ISMLHandler;
  78.   end;
  79.  
  80. implementation
  81.  
  82. uses ComObj;
  83.  
  84. class function CoSMLHandler.Create: ISMLHandler;
  85. begin
  86.   Result := CreateComObject(CLASS_SMLHandler) as ISMLHandler;
  87. end;
  88.  
  89. class function CoSMLHandler.CreateRemote(const MachineName: string): ISMLHandler;
  90. begin
  91.   Result := CreateRemoteComObject(MachineName, CLASS_SMLHandler) as ISMLHandler;
  92. end;
  93.  
  94. end.
  95.